{% load static %}
<!doctype html>
<html class="no-js" lang="zxx">
<head>
	<meta charset="utf-8">
	<title>用户列表</title>
	<link rel="shortcut icon" type="image/x-icon" href="{% static 'images/icon/favicon.png' %}">

	<!-- CSS here -->
	<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">

	<link rel="stylesheet" href="{% static 'css/style.css' %}">

    <style>
        .search { /* 按钮美化 */
	        width: 100px; /* 宽度 */
	        height: 40px; /* 高度 */
	        border-width: 0px; /* 边框宽度 */
	        border-radius: 3px; /* 边框半径 */
	        background: #1E90FF; /* 背景颜色 */
	        cursor: pointer; /* 鼠标移入按钮范围时出现手势 */
	        outline: none; /* 不显示轮廓线 */
	        color: white; /* 字体颜色 */
	        font-size: 17px; /* 字体大小 */
            margin-left: 20px;

        }
        .search:hover { /* 鼠标移入按钮范围时改变颜色 */
            background: #5599FF;
        }
    </style>

</head>
<body>
	<header>
		<div class="header-area header-transparent">
			<div class="main-header header-sticky">
				<div class="container-fluid">
					<div class="menu-wrapper d-flex align-items-center justify-content-between">
						<div class="left-content d-flex align-items-center">
							<div class="logo">
								<a href="{% url 'index' %}"><img src="{% static 'images/logo/logo-test.png' %}" alt=""></a>
							</div>

							<!-- Main-menu -->
							<div class="main-menu d-none d-lg-block">
                                <nav>
                                    <ul id="navigation">
                                        <li><a href="{% url 'index' %}">主页</a></li>
                                        <li><a>列表<i class="fas fa-angle-down"></i></a>
                                            <ul class="submenu">
                                                <li><a href="{% url 'funds' %}">基金列表</a></li>
                                                <li><a href="{% url 'users' %}">用户列表</a></li>
                                            </ul>
                                        </li>
                                        <!--
                                        <li><a href="about.html">用户列表</a></li>
                                        <li><a href="#">Blog</a>
                                            <ul class="submenu">
                                                <li><a href="blog.html">用户列表</a></li>
                                                <li><a href="blog_details.html">Blog Details</a></li>
                                                <li><a href="elements.html">Element</a></li>
                                            </ul>
                                        </li>
                                        -->
                                        <li><a href="{% url 'chart' %}">统计图表</a></li>
                                    </ul>
                                </nav>
                            </div>
						</div>
						<!-- Button -->
						<div class="buttons">
							<ul>
								<li class="button-header">
									<form action="{% url 'logout' %}">
                                        <input type="submit" value="退出登录" class="btn header-btn2">
                                    </form>
								</li>
							</ul>
						</div>
					</div>
					<!-- Mobile Menu -->
					<div class="col-12">
						<div class="mobile_menu d-block d-lg-none"></div>
					</div>
				</div>
			</div>
		</div>
	</header>
	<main>
		<!-- Hero area Start-->
		<div class="slider-area">
			<div class="slider-height2 hero-bg2 hero-overly d-flex align-items-center">
				<div class="container">
					<div class="row">
						<div class="col-xl-12">
							<div class="hero-caption hero-caption2">
								<h2>用户列表</h2>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>


        <div class="input-group col-md-3" style="margin: 20px 20px 20px 30px">
            <form class="form-inline" action="{% url 'users' %}">
                <input type="text" id="search" required="" class="form-control" style="width: 60%;float: left" placeholder="请输入openid或用户名" name="openid">
                <input type="submit" onsubmit="search()" style="float: left;display: inline;" class="search" value="搜索">
            </form>
        </div>
		<!--  Hero area End -->
		<div style="width: 95%;margin: 0 auto;margin-top: 15px">
			<table class="table table-bordered table-hover">
				<thead>
					<tr>
						<td>openid</td>
                        <td>用户名</td>
						<td>剩余金额</td>
                        <td>注册时间</td>
                        <td>是否完成引导</td>
					</tr>
				</thead>
				<tbody>
                {% for user in users %}
                    <tr>
                        <td>{{ user.0 }}</td>
                        <td>{{ user.1 }}</td>
                        <td>{{ user.2 }}</td>
                        <td>{{ user.3 }}</td>
                        {% if user.4 == 1 %}
                            <td>已完成</td>
                        {% else %}
                            <td>未完成</td>
                        {% endif %}

                    </tr>
                {% endfor %}
				</tbody>
			</table>
		</div>


	</main>
</body>
</html>